FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:17-alpine

MAINTAINER Wshape1

COPY --chmod=755 ./*.jar /app.jar

EXPOSE 8080

ENV NACOS_SERVER_ADDR=localhost:8848
ENV NACOS_NAMESPACE=public
ENV NACOS_GROUP=DEFAULT_GROUP
ENV NACOS_FILE_EXTENSION=yaml
ENV NACOS_SHARED_CONFIGS=shiziapi-share-config.yml
ENV JAVA_OPTS="-Xmx128m"

ENV TZ=PRC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app.jar --server.port=8080 --spring.cloud.nacos.server-addr=$NACOS_SERVER_ADDR --spring.cloud.nacos.config.namespace=$NACOS_NAMESPACE --spring.cloud.nacos.discovery.namespace=$NACOS_NAMESPACE --spring.cloud.nacos.config.file-extension=$NACOS_FILE_EXTENSION --spring.cloud.nacos.config.shared-configs=$NACOS_SHARED_CONFIGS --spring.cloud.nacos.config.group=$NACOS_GROUP"]